import { lazy } from "react";
import { Navigate } from "react-router-dom";
const Ad = lazy(() => import('../view/home/ad'));
const My = lazy(() => import('../view/home/my'));
const Search = lazy(() => import('../view/search'));
//路由表类型
export interface RouterType {
  path: string;
  name: string;
  element: JSX.Element;
  children?: RouterType[];
}

export const ROuterList: RouterType[] = [

  {
    path: "/",
    name: "重定向",
    element: <Navigate to="/ad"></Navigate>,
  },
  {
    path: "/ad",
    name: "广告",
    element: <Ad></Ad>,
  },
  {
    path: "/my",
    name: "我的",
    element: <My></My>,
  },
  {
    path: "search",
    name: "搜索页",
    element: <Search></Search>,
  }
];
